from sqlalchemy import Column, String, Integer, SmallInteger
from app.models.base import Base


class Drift(Base):
    id = Column(Integer, primary_key=True)
    recipient_name = Column(String(20), nullable=False) # 真实姓名
    address = Column(String(100), nullable=False) # 地址
    message = Column(String(200)) # 备注信息
    mobile = Column(String(20), nullable=False)

    isbn = Column(String(13))
    book_title = Column(String(50))
    book_author = Column(String(30))
    book_img = Column(String(50))

    # 接受用户信息
    requester_id = Column(Integer) # 请求者id
    requester_nickname = Column(String(20)) # 请求者昵称

    # 赠送用户信息
    gifter_id = Column(Integer)
    gift_id = Column(Integer)
    gifter_nickname = Column(String(20))
    # 礼物状态
    pending = Column(SmallInteger, default=1)
